import request from "@/utils/request";

// 包间开单列表
export function fetchList(query) {
  return request({
    url: "/system/storeCompartmentOrder/list",
    method: "get",
    params: query,
  });
}

// 包间列表
export function fetchRoomList(query) {
  return request({
    url: "/system/storeCompartmentOrder/getRoomByOrderId",
    method: "get",
    params: query,
  });
}

// 新增包间开单
export function addCompartmentOrder(data) {
  return request({
    url: "/system/storeCompartmentOrder",
    method: "post",
    data: data,
  });
}


// 修改包间开单
export function putCompartmentOrder(data) {
  return request({
    url: "/system/storeCompartmentOrder",
    method: "put",
    data: data,
  });
}



// 退单
export function chargeback(data) {
  return request({
    url: "/system/storeCompartmentOrder/chargeback",
    method: "put",
    data: data,
  });
}

// 批量删除
export function delCompartmentOrder(roomOrderIds) {
  return request({
    url: `/system/storeCompartmentOrder/${roomOrderIds}`,
    method: "delete",
  });
}
